package b1.conifg
{
	public class TaskConfig
	{
		//所有任务的唯一索引
		public var index:int;
		//任务类型： 0, 主线任务; 1, 节日任务
		public var type:int;
		//任务大标题
		public var name:String;
		//任务小标题
		public var subName:String;
		//骨头奖励
		public var boneBonus:int;
		//经验奖励
		public var expBonus:int;
		//任务描述文字
		public var description:String;
		//任务完成后的描述文字
		public var accomplishedDescription:String;
		//任务背景图片
		public var backgroundImage:String;
		//任务图片
		public var iconImage:String;
		//是否闪烁任务图标
		public var shineTaskIconFlag:Boolean;
		//是否在完成时闪烁任务图标
		public var shineTaskIconFlagWhenAccomplish:Boolean;
		//领取时闪烁图标的索引
		public var shineIconIndex:int; 
		//所完成的特殊事件的索引
//		public var specialCaseIndex:int;
		//新鲜事标题
		public var feedTitle:String;
		//新鲜事内容
		public var feedDescription:String;
		//资源链接
		public var resourceURL:String;
		//完成此任务之前，在包裹邻居栏中显示的虚拟用户ID号
		public var virtualPlayerIds:Array;
		//文字颜色
		public var textColor:int;
		//发光颜色
		public var shineColor:int;
		
		public function TaskConfig(taskXML:XML)
		{
			description = taskXML.description;
			accomplishedDescription = taskXML.accomplishedDescription;
			index = parseInt(taskXML.index);
			type = parseInt(taskXML.type);
			boneBonus = parseInt(taskXML.boneBonus);
			expBonus = parseInt(taskXML.expBonus);
			textColor = parseInt(taskXML.textColor);
			shineColor = parseInt(taskXML.shineColor);
			name = taskXML.name;
			subName = taskXML.subName;
			backgroundImage = taskXML.backgroundImage;
			iconImage = taskXML.iconImage;
			shineTaskIconFlag = Boolean(parseInt(taskXML.shineTaskIconFlag));
			shineTaskIconFlagWhenAccomplish = Boolean(parseInt(taskXML.shineTaskIconFlagWhenAccomplish));
			shineIconIndex = parseInt(taskXML.shineIconIndex);
//			specialCaseIndex = parseInt(taskXML.specialCaseIndex);
			feedTitle = taskXML.feedTitle;
			feedDescription = taskXML.feedDescription;
			resourceURL = taskXML.resourceURL;
			virtualPlayerIds = new Array();
			var virtualPlayerIdStrs:Array = taskXML.virtualPlayerIds.split(",");
			for (var i:int = 0; i < virtualPlayerIdStrs.length; i++)
				virtualPlayerIds.push(parseInt(virtualPlayerIdStrs[i]));
		}

	}
}